<?php

    require_once dirname(dirname(__FILE__)) . '/config/config.php';
    require_once DOCUMENT_ROOT . DIR_SHARED_DAO . 'dao_industry.php';

    class api_users
    {
        public static function get_all_users()
        {
            $dao_user = new dao_user();
            return $dao_user->get_all();
        }
        
        public static function get_user_balance_by_user_id($user_id)
        {
            $dao_user = new dao_user();
            $user = $dao_user->get_by_id($user_id);
            return $user['balance'];
        }
        
        public static function update_balance($user_id, $balance)
        {
            $dao_user = new dao_user();
            return $user = $dao_user->update_balance($user_id, $balance);
        }
    }
